package by.onlinernews_0_1;

import android.content.Context;
import android.database.Cursor;
import android.support.v4.content.CursorLoader;
import android.util.Log;


public class CommentsCursorLoader extends CursorLoader {

    DB db;
    String link;
    
    
    public CommentsCursorLoader(Context context,String link, DB db) {
      super(context);
      this.db = db;
      this.link=link;

    }

	@Override
    public Cursor loadInBackground() {
    	
      Log.d("myLogs", "load comments for: "+ link);
      Cursor cursor = db.getCommentsData(link);      
      return cursor;
    }
    
  }
